import bus from '@/bus'
let data = {
  columns: [{
    type: 'selection',
    width: 60,
    align: 'left'
  }, {
    title: '功能菜单',
    align: 'left',
    key: 'menuOne',
    width: 260
  }, {
    title: '角色权限',
    key: 'menuTwo',
    align: 'left',
    render: (h, params) => {
      let menuTwoArr = params.row.menuTwo
      let childrenArr = []
      menuTwoArr.forEach(item => {
        let child = h('span', {
          class: 'mb big'
        },
        [
          h('Checkbox', {
            props: {
              value: item.flag
            },
            on: {
              'on-change': (event)=>{
                bus.$emit('onChange', event, params.row, menuTwoArr, item)
              }
            }
          }, item.label)
        ])
        childrenArr.push(child)
      })
      return h('div', {class: 'mb'}, childrenArr)
    }
  }],
  data: []
}
export default data